package com.monkeygroup.mygoplus.commit.thing.vo;

import android.util.Log;

import com.monkeygroup.mygoplus.user.vo.PageInfo;

import java.util.HashMap;
import java.util.Map;

/**
 * 租房接口请求参数
 * Created by cumt on 2017/5/17.
 */

public class RentCommitVO extends PageInfo {

    private String searchKey;
    /**
     * 区域模式搜寻的国家/地区(比如中国大陆)
     目前开放台湾、中国大陆、马来西亚、柬埔寨，代码分别为158、156、458、116
     */
    private int region;
    /**
     * 区域模式搜寻的省份(比如福建省)
     目前开放台湾、中国大陆、马来西亚、柬埔寨，其中台湾和马来西亚固定为15801和45801
     */
    private int state;

    private int city;
    private int area;
    /**
     * 是否搜寻住宅(1：是；0：不是) (大陆和台湾专用)
     */
    private int house;
    /**
     * 是否搜寻店面(1：是；0：不是) (大陆和台湾专用)
     */
    private int store;
    /**
     * 是否搜寻办公室(1：是；0：不是) (大陆和台湾专用)
     */
    private int office;
    /**
     * 是否搜寻厂房(1：是；0：不是) (大陆和台湾专用)
     */
    private int workshop;
    /**
     * 是否搜寻车位(1：是；0：不是) (大陆和台湾专用)
     */
    private int stall;
    private int land;
    /**
     * 物件类型(请参考附录5)
     */
    private int modal;
    private String ye;
    private int yh;
    private int yg;
    private int yc;
    private int yf;
    private int yi;
    private int yl;
    private int ym;

    /**
     * 搜寻的最小户数
     */
    private int buildingroom1;
    /**
     * 搜寻的最大户数
     */
    private int buildingroom2;

    public int getBuildingroom1() {
        return buildingroom1;
    }

    public void setBuildingroom1(int buildingroom1) {
        this.buildingroom1 = buildingroom1;
    }

    public int getBuildingroom2() {
        return buildingroom2;
    }

    public void setBuildingroom2(int buildingroom2) {
        this.buildingroom2 = buildingroom2;
    }

    /**
     * 屋龄(1：5年以下；2：5-10年；3：10-20年；4：20-30年；5：30-40年；6：40年以上)
     */
    private int completeyear;
    /**
     * 住宅的格局(1：1房；2：2房；3：3房；4：4房；5：5房以上)
     */
    private int rooms;
    /**
     * 搜寻的最低租金(台湾和中国：元为单位；马来西亚RM为单位，柬埔寨USD为单位)
     */
    private int selfprice1;
    /**
     * 搜寻的最高租金(台湾和中国：元为单位；马来西亚RM为单位，柬埔寨USD为单位)
     */
    private int selfprice2;
    /**
     * 搜寻的最小面积(繁中：坪为单位；简中：平米为单位；马来西亚平方英尺为单位，柬埔寨平米为单位)
     */
    private int  selfsquare1;
    /**
     * 搜寻的最大面积(繁中：坪为单位；简中：平米为单位；马来西亚平方英尺为单位，柬埔寨平米为单位)
     */
    private int selfsquare2;
    /**
     * 性别要求(0：不限；1：男；2：女)
     */
    private int sex;
    /**
     * 其他条件(0：不限；1：可養寵物；2：可開伙)
     */
    private int cookingpetyn;

    /**
     * 排序方式(‘default’：更新时间从新到旧；
     ’property_rentprice desc’：價格由高到低；
     ’property_rentprice asc’：價格由低到高；
     ’property_lawnarea desc’：面積由高到低；
     ’property_lawnarea asc’：面積由低到高；
     ’rentprice desc’：單價由高到低；
     ’rentprice asc’：單價由低到高；
     ’property_added desc’：發佈時間從新至舊)

     */
    private String order="default";
    /**
     * 排序方式是價格由高到低或者價格由低到高的时候，选择哪种类型(1：月费；2：日费；3：年费；4：半年费；5：季费；6：每学期；7：每学年；8：每坪费用；9：每平米费用；10：其他)
     */
    private String rentUnit;

    private float lat;
    private float lng;
    /**
     * 範圍（公里）
     */
    private float scope;

    public String getSearchKey() {
        return searchKey;
    }

    public void setSearchKey(String searchKey) {
        this.searchKey = searchKey;
    }

    public int getRegion() {
        return region;
    }

    public void setRegion(int region) {
        this.region = region;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getCity() {
        return city;
    }

    public void setCity(int city) {
        this.city = city;
    }

    public int getArea() {
        return area;
    }

    public void setArea(int area) {
        this.area = area;
    }

    public int getHouse() {
        return house;
    }

    public void setHouse(int house) {
        this.house = house;
    }

    public int getStore() {
        return store;
    }

    public void setStore(int store) {
        this.store = store;
    }

    public int getOffice() {
        return office;
    }

    public void setOffice(int office) {
        this.office = office;
    }

    public int getWorkshop() {
        return workshop;
    }

    public void setWorkshop(int workshop) {
        this.workshop = workshop;
    }

    public int getStall() {
        return stall;
    }

    public void setStall(int stall) {
        this.stall = stall;
    }

    public int getLand() {
        return land;
    }

    public void setLand(int land) {
        this.land = land;
    }

    public int getModal() {
        return modal;
    }

    public void setModal(int modal) {
        this.modal = modal;
    }

    public String getYe() {
        return ye;
    }

    public void setYe(String ye) {
        this.ye = ye;
    }

    public int getYh() {
        return yh;
    }

    public void setYh(int yh) {
        this.yh = yh;
    }

    public int getYg() {
        return yg;
    }

    public float getLat() {
        return lat;
    }

    public void setLat(float lat) {
        this.lat = lat;
    }

    public float getLng() {
        return lng;
    }

    public void setLng(float lng) {
        this.lng = lng;
    }

    public float getScope() {
        return scope;
    }

    public void setScope(float scope) {
        this.scope = scope;
    }

    public void setYg(int yg) {
        this.yg = yg;
    }

    public int getYc() {
        return yc;
    }

    public void setYc(int yc) {
        this.yc = yc;
    }

    public int getYf() {
        return yf;
    }

    public void setYf(int yf) {
        this.yf = yf;
    }

    public int getYi() {
        return yi;
    }

    public void setYi(int yi) {
        this.yi = yi;
    }

    public int getYl() {
        return yl;
    }

    public void setYl(int yl) {
        this.yl = yl;
    }

    public int getYm() {
        return ym;
    }

    public void setYm(int ym) {
        this.ym = ym;
    }

    public int getCompleteyear() {
        return completeyear;
    }

    public void setCompleteyear(int completeyear) {
        this.completeyear = completeyear;
    }

    public int getRooms() {
        return rooms;
    }

    public void setRooms(int rooms) {
        this.rooms = rooms;
    }

    public int getSelfprice1() {
        return selfprice1;
    }

    public void setSelfprice1(int selfprice1) {
        this.selfprice1 = selfprice1;
    }

    public int getSelfprice2() {
        return selfprice2;
    }

    public void setSelfprice2(int selfprice2) {
        this.selfprice2 = selfprice2;
    }

    public int getSelfsquare1() {
        return selfsquare1;
    }

    public void setSelfsquare1(int selfsquare1) {
        this.selfsquare1 = selfsquare1;
    }

    public int getSelfsquare2() {
        return selfsquare2;
    }

    public void setSelfsquare2(int selfsquare2) {
        this.selfsquare2 = selfsquare2;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getCookingpetyn() {
        return cookingpetyn;
    }

    public void setCookingpetyn(int cookingpetyn) {
        this.cookingpetyn = cookingpetyn;
    }



    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public String getRentUnit() {
        return rentUnit;
    }

    public void setRentUnit(String rentUnit) {
        this.rentUnit = rentUnit;
    }

    public Map<String,String> toMap(){
        Map<String,String> map=super.toMap();
        if(searchKey!=null && !"".equals(searchKey)){
            map.put("searchKey",""+searchKey);
        }
        if(state!=0){
            map.put("state",""+state);
        }
        if(city!=0){
            map.put("city",""+city);
        }
        if(area!=0){
            map.put("area",""+area);
        }
        if(modal!=0){
            map.put("modal",""+modal);
        }

        map.put("store",""+store);
        map.put("house",""+house);
        map.put("office",""+office);
        map.put("workshop",""+workshop);
        map.put("stall",""+stall);
        map.put("land",""+land);
        map.put("rooms",""+rooms);
        map.put("order",""+order);
        if(selfprice1!=0){
            map.put("selfprice1",""+selfprice1);
        }
        if(selfprice2!=0){
            map.put("selfprice2",""+selfprice2);
        }
        if(selfsquare1!=0){
            map.put("selfsquare1",""+selfsquare1);
        }
        if(selfsquare2!=0){
            map.put("selfsquare2",""+selfsquare2);
        }
        map.put("completeyear",""+completeyear);
        if(lat!=0||lng!=0){
            map.put("lat",""+lat);
            map.put("lng",""+lng);
        }
        if(scope!=0){
            map.put("scope",""+scope);
        }

        return map;
    }
}
